package C;

import java.util.Arrays;
import java.util.Scanner;

public class C4My {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] cnts = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();

//        String line = sc.nextLine();
//
//        String[] cntsString = line.split(" ");
//
//        int[] cnts = new int[cntsString.length];
//        for (int i=0;i<cnts.length;i++) {
//            cnts[i] = Integer.parseInt(cntsString[i]);
//        }

        int h = sc.nextInt();
        System.out.println(getResult(cnts,h));
    }

    public static int getResult(int[] cnts,int h) {

        int min = 1;
        int max = Arrays.stream(cnts).max().orElse(0);
        int ans = max;

        if (cnts.length>h) {
            return 0;
        }
        if (cnts.length == h) {
            return max;
        }
        while (min <= max) {
            int mid = (min+max) >> 1;

            if (check(mid,h,cnts)) {
                ans = mid;
                max = mid - 1;
            } else {
                min = mid + 1;
            }
        }
        return ans;
    }

    public static boolean check(int speed,int limit, int[] cnts) {
        int cost = 0;
        for (int cnt:cnts) {
            cost += cnt/speed + (cnt % speed == 0 ? 0:1);
            if (cost>limit) {
                return false;
            }
        }
        return true;
    }
}
